<?php /* Smarty version 2.6.26, created on 2013-02-12 16:01:20
         compiled from mshop_form.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'date_format', 'mshop_form.html', 118, false),array('modifier', 'escape', 'mshop_form.html', 138, false),array('function', 'html_options', 'mshop_form.html', 151, false),)), $this); ?>
<?php echo '<?xml'; ?>
 version="1.0" encoding="utf-8"<?php echo '?>'; ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="Content-Script-Type" content="text/javascript" />
		<meta http-equiv="Content-Style-Type" content="text/css" />
		<title>コントロールパネル</title>
		<link rel="stylesheet" href="./assets/styles/default.css" type="text/css" />
		
		<link rel="stylesheet" href="./assets/styles/ui-lightness/ui.all.css" type="text/css" />
		
		<link rel="stylesheet" href="./assets/styles/ui-lightness/jquery-ui-1.7.3.custom.css" type="text/css" />
		<link rel="stylesheet" href="./assets/styles/dialog.css" type="text/css" />
		
		<script src="assets/scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
		<script src="assets/scripts/jquery-ui-1.7.3.custom.min.js" type="text/javascript"></script>
		<script src="assets/scripts/ui/ui.dialog.js" type="text/javascript"></script>
		
		<script src="assets/scripts/menu.js" type="text/javascript"></script>
		<script src="assets/scripts/table.js" type="text/javascript"></script>
		<script type="text/javascript" src="./tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
		<script type="text/javascript" src="./assets/scripts/editor.js"></script>
		<script type="text/javascript" src="./assets/scripts/ui/ui.datepicker.js"></script>
		<script type="text/javascript" src="./assets/scripts/ui/ui.core.js"></script>
		<script type="text/javascript" src="./assets/scripts/search.js"></script>
		<script type="text/javascript">
		$(function() {
			$('.message').fadeIn("slow");
			$('.btn_regist').click(function(){
				if( confirm('登録してよろしいですか？') ){
					document.fm.mode.value = 'input';
					document.fm.submit();
				}
			});
			
			$('.btn_update').click(function(){
				if( confirm('更新してよろしいですか？') ){
					document.fm.mode.value = 'input';
					document.fm.submit();
				}
			});
			$('.btn_return').click(function(){
				location.href = "mshop_index.php?hist=2";
			});
			$('#shop_c').click(function(){
				document.fm.parent_shop_cd.value = "";
				document.fm.parent_shop_name.value = "";	
			});
			
			$('.lnews').click(function(){
				mystr =  $(this).attr("id").split("_");
				$('#nsnmid'+  mystr[1] ).attr("value", "") ;
				
				$('#nsid'+  mystr[1] ).attr("value", "") ;
			});
			
			$("#block_cd").change(function(){
				document.fm.block_name.value = $("#block_cd").find("option:selected").text();
			});
			
			$("#local_cd").change(function(){
				document.fm.local_name.value = $("#local_cd").find("option:selected").text();
			});
			$('.text_date').datepicker({
				changeMonth: true,
				changeYear: true,
				dateFormat: 'yy/mm/dd'
			});
		});
		
		function setSS( valcd, valnm ) {
			if (gPara == "shop") {
				document.fm.parent_shop_cd.value = valcd;
				document.fm.parent_shop_name.value = valnm;
			} else {
				var thename = gPara.replace("_", "")				
				eval("document.fm." +  thename + ".value = '" + valcd+ "'");
				eval("document.fm." +  thename + "_name.value ='" + valnm + "'");		
			}
			
			//eval("document.fm." +  gPara + "_name.value ='" + valnm + "'");
			
			$('#dialog').dialog("close");
		}
		/*
		function setS(  valnm ) {
			//eval("document.fm." +  gPara + "_cd.value = " + valcd);
			eval("document.fm." +  gPara + "_name.value ='" + valnm + "'");			
			$('#dialog').dialog("close");
		}
		*/
		</script>
		
	</head>
	<body id="">
<?php echo $this->_tpl_vars['menu']; ?>

<?php echo $this->_tpl_vars['logout']; ?>

		<div id="container"><div class="wrapper">
			<h2>店舗マスター管理</h2>
			<ul class="submenu clearfix">
				<li><a href="mshop_index.php">店舗情報一覧</a></li>
				<li>店舗情報登録</li>
				<li><a href="mshop_import.php">CSV更新</a></li>
			</ul>
			<h3>店舗情報<?php if ($this->_tpl_vars['forms']['id'] == ''): ?>登録<?php else: ?>更新<?php endif; ?><?php if ($this->_tpl_vars['phase'] == 'complete'): ?>完了<?php endif; ?></h3>
<?php if ($this->_tpl_vars['phase'] == 'input'): ?>
			<p class="message">内容を確認し、<?php if ($this->_tpl_vars['forms']['id'] == ''): ?>登録<?php else: ?>更新<?php endif; ?>ボタンをクリックしてください。</p>
			<form name="fm" action="mshop_form.php" method="post">
				<table class="formTable">
					<tbody>
<?php if ($this->_tpl_vars['forms']['id'] != ''): ?>
						<tr>
							<th>更新日</th>
							<td>
								<?php echo ((is_array($_tmp=$this->_tpl_vars['forms']['u_time'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%Y/%m/%d %H:%M") : smarty_modifier_date_format($_tmp, "%Y/%m/%d %H:%M")); ?>
<input type="hidden" name="u_time" value="<?php echo $this->_tpl_vars['forms']['u_time']; ?>
" />
							</td>
						</tr>
						<tr>
							<th>更新者</th>
							<td>
								<?php echo $this->_tpl_vars['forms']['m_user_name']; ?>
<input type="hidden" name="m_user_name" value="<?php echo $this->_tpl_vars['forms']['m_user_name']; ?>
" />
							</td>
						</tr>
						<tr>
							<th>ID</th>
							<td>
								<?php echo $this->_tpl_vars['forms']['id']; ?>

							</td>
						</tr>
<?php endif; ?>

						<tr>
							<th>※店舗コード</th>
							<td>
								<input type="text" name="shop_cd" class="text" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['forms']['shop_cd'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
"  maxlangth="20" /><?php echo $this->_tpl_vars['err']['shop_cd']; ?>

							</td>
						</tr>
						<tr>
							<th>※店舗名</th>
							<td>
								<input type="text" name="shop_name" class="text" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['forms']['shop_name'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
"  maxlangth="100" /><?php echo $this->_tpl_vars['err']['shop_name']; ?>

							</td>
						</tr>

						<tr id = "tr_op4" >
							<th>※地域ブロック</th>
							<td>
<?php echo smarty_function_html_options(array('id' => 'block_cd','name' => 'block_cd','options' => $this->_tpl_vars['block'],'selected' => $this->_tpl_vars['forms']['block_cd']), $this);?>
<?php echo $this->_tpl_vars['err']['block_cd']; ?>

								<input type="hidden" name="block_name" value="<?php echo $this->_tpl_vars['forms']['block_name']; ?>
" />
							</td>
						</tr>
						<tr>
							<th>※都道府県</th>
							<td>
<?php echo smarty_function_html_options(array('id' => 'local_cd','name' => 'local_cd','options' => $this->_tpl_vars['local'],'selected' => $this->_tpl_vars['forms']['local_cd']), $this);?>
<?php echo $this->_tpl_vars['err']['local_cd']; ?>

								<input type="hidden" name="local_name" value="<?php echo $this->_tpl_vars['forms']['local_name']; ?>
" />
							</td>
						</tr>
						<tr>
							<th>※郵便番号</th>
							<td>
								<input type="text" name="postcode" class="text" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['forms']['postcode'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
"  maxlangth="８" />(999-9999)<?php echo $this->_tpl_vars['err']['postcode']; ?>

								
							</td>
						</tr>
						<tr>
							<th>※電話番号</th>
							<td>
								<input type="text" name="tel" class="text" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['forms']['tel'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
"  maxlangth="20" />(999-9999-9999)<?php echo $this->_tpl_vars['err']['tel']; ?>

							</td>
						</tr>
						<tr>
							<th>※住所</th>
							<td>
								<input type="text" name="address" class="text" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['forms']['address'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
"  maxlangth="200" /><?php echo $this->_tpl_vars['err']['address']; ?>

							</td>
						</tr>
<!--						<tr>
							<th>※SMXフラグ</th>
							<td>
<?php if ($this->_tpl_vars['forms']['smx'] == '1'): ?>
								<label><input  type="radio" name="smx" value="1" checked /> 設定する</label> <label><input  type="radio" name="smx" value="9" />設定しない</label> <?php echo $this->_tpl_vars['err']['smx']; ?>

								
<?php else: ?>
								<label><input  type="radio" name="smx" value="1" /> 設定する</label> <label><input  type="radio" name="smx" value="9" checked />設定しない</label> <?php echo $this->_tpl_vars['err']['smx']; ?>

<?php endif; ?>
								
							</td>
						</tr>
						<tr>
							<th>※都心フラグ</th>
							<td>
<?php if ($this->_tpl_vars['forms']['center'] == '1'): ?> 
								<label><input  type="radio" name="center" value="1" checked /> 設定する</label> <label><input  type="radio" name="center" value="9" />設定しない</label> <?php echo $this->_tpl_vars['err']['center']; ?>

								
<?php else: ?>
								<label><input  type="radio" name="center" value="1" /> 設定する</label> <label><input  type="radio" name="center" value="9" checked />設定しない</label> <?php echo $this->_tpl_vars['err']['center']; ?>

<?php endif; ?>
							</td>
						</tr>-->
						<tr>
							<th>地域新聞1</th>
							<td>
								<input type="text"  id="nsid1" name="lnews1_name" class="text" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['forms']['lnews1_name'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
"  readonly="readonly"/>
								<input type="hidden"  id="nsnmid1" name="lnews1"  value="<?php echo ((is_array($_tmp=$this->_tpl_vars['forms']['lnews1'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" />
								<button type="button" id="lnews_1" class="btn_search" rel="pattern"><span>参照</span></button>
								<button type="button" class="lnews" id="cnews_1" ><span>クリア</span></button><?php echo $this->_tpl_vars['err']['lnews1']; ?>

							</td>
						</tr>
						<tr>
							<th>地域新聞2</th>
							<td>
								<input type="text"  id="nsid2"     name="lnews2_name" class="text" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['forms']['lnews2_name'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
"  readonly="readonly"/>
								<input type="hidden"  id="nsnmid2"  name="lnews2"  value="<?php echo ((is_array($_tmp=$this->_tpl_vars['forms']['lnews2'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" />
								<button type="button" id="lnews_2" class="btn_search" rel="pattern"><span>参照</span></button>
								<button type="button" class="lnews" id="cnews_2" ><span>クリア</span></button><?php echo $this->_tpl_vars['err']['lnews2']; ?>

							</td>
						</tr>
						<tr>
							<th>地域新聞3</th>
							<td>
								<input type="text"  id="nsid3" name="lnews3_name" class="text" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['forms']['lnews3_name'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
"  readonly="readonly"/>
								<input type="hidden"  id="nsnmid3" name="lnews3"  value="<?php echo ((is_array($_tmp=$this->_tpl_vars['forms']['lnews3'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" />
								<button type="button" id="lnews_3" class="btn_search" rel="pattern"><span>参照</span></button>
								<button type="button" class="lnews" id="cnews_3" ><span>クリア</span></button><?php echo $this->_tpl_vars['err']['lnews3']; ?>

							</td>
						</tr>
						<tr>
							<th>地域新聞4</th>
							<td>
								<input type="text"  id="nsid4" name="lnews4_name" class="text" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['forms']['lnews4_name'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" readonly="readonly" />
								<input type="hidden"  id="nsnmid4" name="lnews4"  value="<?php echo ((is_array($_tmp=$this->_tpl_vars['forms']['lnews4'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" />
								<button type="button" id="lnews_4" class="btn_search" rel="pattern"><span>参照</span></button>
								<button type="button" class="lnews" id="cnews_4" ><span>クリア</span></button><?php echo $this->_tpl_vars['err']['lnews4']; ?>

							</td>
						</tr>
						<tr>
							<th>地域新聞5</th>
							<td>
								<input type="text"  id="nsid5" name="lnews5_name" class="text" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['forms']['lnews5_name'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" readonly="readonly" />
								<input type="hidden"  id="nsnmid5" name="lnews5"  value="<?php echo ((is_array($_tmp=$this->_tpl_vars['forms']['lnews5'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" />
								<button type="button" id="lnews_5" class="btn_search" rel="pattern"><span>参照</span></button>
								<button type="button" class="lnews" id="cnews_5" ><span>クリア</span></button><?php echo $this->_tpl_vars['err']['lnews5']; ?>

							</td>
						</tr>
						<tr>
							<th>廃止日</th>
							<td>
								<input type="text" name="stop_date" class="text_date" value="<?php echo $this->_tpl_vars['forms']['stop_date']; ?>
" /><?php echo $this->_tpl_vars['err']['stop_date']; ?>

							</td>
						</tr>
						<tr>
							<th>※ゾーンAJA</th>
							<td>
								<?php echo smarty_function_html_options(array('id' => 'zone_aja','name' => 'zone_aja','options' => $this->_tpl_vars['zoneuser'],'selected' => $this->_tpl_vars['forms']['zone_aja']), $this);?>
<?php echo $this->_tpl_vars['err']['zone_aja']; ?>

							</td>
						</tr>
						<tr>
							<th>※エリアAJA</th>
							<td>
								<?php echo smarty_function_html_options(array('name' => 'area_aja','options' => $this->_tpl_vars['areauser'],'selected' => $this->_tpl_vars['forms']['area_aja']), $this);?>
<?php echo $this->_tpl_vars['err']['area_aja']; ?>

							</td>
						</tr>
						
						<!--
						<tr>
							<th>親店舗</th>
							<td colspan="4">
								<input type="text" name="parent_shop_name" class="text" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['forms']['parent_shop_name'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" readonly="readonly" />
								<input type="hidden" name="parent_shop_cd"  value="<?php echo ((is_array($_tmp=$this->_tpl_vars['forms']['parent_shop_cd'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" />
								<button type="button" id="shop" class="btn_search" rel="shop"><span>参照</span></button>
								<button type="button" id="shop_c" rel="shop"><span>クリア</span></button>
							</td>
						</tr>-->
						<tr>
							<th>備考</th>
							<td>
								<textarea name="memo" class="textarea"  style="width:380px" /><?php echo ((is_array($_tmp=$this->_tpl_vars['forms']['memo'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
</textarea><?php echo $this->_tpl_vars['err']['memo']; ?>

							</td>
						</tr>
						<tr>
							<th>年商(億円)</th>
							<td>
								<input type="text" name="year_sale" class="text" value="<?php echo $this->_tpl_vars['forms']['year_sale']; ?>
" /><?php echo $this->_tpl_vars['err']['year_sale']; ?>

							</td>
						</tr>
					</tbody>
				</table>
				<p class="button">
<?php if ($this->_tpl_vars['forms']['id'] != ''): ?>
					<button type="button" class="btn_return" class="submit"><span>戻る</span></button>
					<button type="button" class="btn_update" class="submit"><span>更新</span></button>
<?php else: ?>
					<button type="button" class="btn_regist" class="submit"><span>登録</span></button>
<?php endif; ?>
				</p>
				<input type="hidden" name="id" value="<?php echo $this->_tpl_vars['forms']['id']; ?>
" />
				<input type="hidden" name="mode" value="" />
			</form>

<div id="dialog" >
</div>
 
<?php endif; ?>

<?php if ($this->_tpl_vars['phase'] == 'complete'): ?>
			<p class="message"><?php echo $this->_tpl_vars['message']; ?>
</p>
			<ul>
<?php if ($this->_tpl_vars['forms']['id'] != ''): ?>
				<li>>> <a href="mshop_index.php?hist=2">一覧ページに戻る</a></li>
<?php else: ?>
				<li>>> <a href="mshop_index.php">一覧ページに戻る</a></li>
<?php endif; ?>
				<li>>> <a href="mshop_form.php">新規登録</a></li>
<?php if ($this->_tpl_vars['forms']['id'] != ''): ?>
				<li>>> <a href="mshop_form.php?id=<?php echo $this->_tpl_vars['forms']['id']; ?>
">更新</a></li>
<?php endif; ?>
			</ul>
<?php endif; ?>

		</div></div>
		<?php echo $this->_tpl_vars['footer']; ?>

	</body>
</html>